<header id="overview" class="jumbotron subhead curved">
	<h1 class="curved">Dados do sistema</h1>
</header>

<form id="form_sistema"
	name="form_sistema" 
	class="form-horizontal"
	action="<?php echo url_for('sistema/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_sistema='.$form->getObject()->getIdSistema() : '')) ?>" 
	method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>
>

	<?php if (!$form->getObject()->isNew()): ?>
	<input type="hidden" name="sf_method" value="put" />
	<input type="hidden" name="id_sistema" value="<?php echo $form->getObject()->getIdSistema() ?>" />
	<?php endif; ?>
	
	<?php echo $form->renderHiddenFields() ?>
	<?php echo $form->renderGlobalErrors() ?>

	<fieldset>
		<legend>Cadastro/Edição</legend>
		
      <div class="tabbable" style="margin-bottom: 9px;">
        <ul class="nav nav-tabs">
          <li class="active"><a href="#tab1" data-toggle="tab">Dados</a></li>
          <li><a href="#tab2" data-toggle="tab">Quem somos</a></li>
          <li><a href="#tab3" data-toggle="tab">Serviços</a></li>
        </ul>
        <div class="tab-content">
          <div class="tab-pane active" id="tab1">
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['nm_sistema']->renderLabel() ?></label>
	            <div class="controls">
	            	<?php echo $form['nm_sistema']->render(array('size' => 50)) ?>
	                  <?php echo form_error('nm_sistema'); ?>
	            </div>
	          </div>
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['ds_twitter']->renderLabel() ?></label>
	            <div class="controls">
	                  <?php echo $form['ds_twitter']->render(array('size' => 50)) ?>
	                  <?php echo form_error('ds_twitter'); ?>
	            </div>
	          </div>
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['ds_facebook']->renderLabel() ?></label>
	            <div class="controls">
	                  <?php echo $form['ds_facebook']->render(array('size' => 50)) ?>
	                  <?php echo form_error('ds_facebook'); ?>
	            </div>
	          </div>
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['ds_youtube']->renderLabel() ?></label>
	            <div class="controls">
	                  <?php echo $form['ds_youtube']->render(array('size' => 50)) ?>
	                  <?php echo form_error('ds_youtube'); ?>
	            </div>
	          </div>
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['ds_orkut']->renderLabel() ?></label>
	            <div class="controls">
	                  <?php echo $form['ds_orkut']->render(array('size' => 50)) ?>
	                  <?php echo form_error('ds_orkut'); ?>
	            </div>
	          </div>
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['ds_flickr']->renderLabel() ?></label>
	            <div class="controls">
	                  <?php echo $form['ds_flickr']->render(array('size' => 50)) ?>
	                  <?php echo form_error('ds_flickr'); ?>
	            </div>
	          </div>
          </div>

          <div class="tab-pane" id="tab2">
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['ds_sobre']->renderLabel() ?></label>
	            <div class="controls">
	                  <?php echo $form['ds_sobre'] ?>
	                  <?php echo form_error('ds_sobre'); ?>
	            </div>
	          </div>
          </div>
          <div class="tab-pane" id="tab3">
	          <div class="control-group">
	            <label class="control-label" for="input01"><?php echo $form['ds_servico']->renderLabel() ?></label>
	            <div class="controls">
	                  <?php echo $form['ds_servico'] ?>
	                  <?php echo form_error('ds_servico'); ?>
	            </div>
	          </div>
          </div>
        </div>
      </div> <!-- /tabbable -->

		<?php
			comandos_form(
				null,
				'<button type="submit" class="btn btn-info">:: Salvar ::</button>'
			);
		?>

	</fieldset>
</form>
<script type="text/javascript">
$(document).ready(function()
{
	//$('.tabbable').tab();
    System.formdata.save(new Array("msgAlerta", "Atenção:"));
});
</script>

<?php preenche_mensagem_flash() ?>